package uno.linze.interview_question.mapper;

import uno.linze.interview_question.domain.QuestionTagRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
* @author wangy
* @description 针对表【question_tag_relation(问题与标签的多对多关联表)】的数据库操作Mapper
* @createDate 2025-09-27 12:57:25
* @Entity generator.domain.QuestionTagRelation
*/
public interface QuestionTagRelationMapper extends BaseMapper<QuestionTagRelation> {

    /**
     * 批量插入问题标签关联关系
     * @param relations 关联关系列表
     * @return 插入的行数
     */
    int batchInsertQuestionTagRelations(@Param("relations") List<QuestionTagRelation> relations);

    /**
     * 根据问题ID删除所有标签��联关系
     * @param questionId 问题ID
     * @return 删除的行数
     */
    int deleteByQuestionId(@Param("questionId") Integer questionId);
}
